package contegor.scire.structure.lang;


/**
 * Thrown by the {@link WordsAnalyzer} and related when can't handle and unknown word.  
 */
public class UnknownWordException extends UnderstandException {
  private static final long serialVersionUID = 4040965713697185743L;

  private static final String UNKNOWN_WORD_MSG = "Unknown word: ";

  private final String word;

  public UnknownWordException(String word, Throwable cause) {
    super(UNKNOWN_WORD_MSG + word, cause);
    this.word = word;
  }

  public UnknownWordException(String word) {
    super(UNKNOWN_WORD_MSG + word);
    this.word = word;
  }

  public String getWord() {
    return word;
  }
}
